package com.thinkgem.jeesite.modules.community.wev.front;

import com.thinkgem.jeesite.common.config.Global;
import com.thinkgem.jeesite.common.web.BaseController;
import com.thinkgem.jeesite.modules.cms.entity.Site;
import com.thinkgem.jeesite.modules.cms.utils.CmsUtils;
import com.thinkgem.jeesite.modules.sys.entity.Office;
import com.thinkgem.jeesite.modules.sys.entity.User;
import com.thinkgem.jeesite.modules.sys.service.OfficeService;
import com.thinkgem.jeesite.modules.sys.service.SystemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * Created by xiaguoqiang on 16/5/30.
 */
@Controller
@RequestMapping(value = "${frontPath}/community")
//@RequestMapping(value = "${adminPath}/community")
public class FrontCommunity  extends BaseController {
    @Autowired
    private SystemService systemService;
    @Autowired
    private OfficeService officeService;

    @RequestMapping(value = "index-{officeId}")
    public String index(@PathVariable String officeId, Model model) {
        Office office = officeService.get(officeId);
        model.addAttribute("office", office);
        return "modules/community/front/frontViewArticle";
    }
}
